package com.smartfast4j.springboot.mybatis.demo.service.impl;

import com.smartfast4j.springboot.mybatis.demo.dao.AccountMapper;
import com.smartfast4j.springboot.mybatis.demo.pojo.Account;
import com.smartfast4j.springboot.mybatis.demo.pojo.AccountExample;
import com.smartfast4j.springboot.mybatis.demo.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by gacl on 2017/11/20.
 */
@Service
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public int countByExample(AccountExample example) {
        return accountMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(AccountExample example) {
        return accountMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return accountMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(Account record) {
        return accountMapper.insertSelective(record);
    }

    @Override
    public List<Account> selectByExample(AccountExample example) {
        return accountMapper.selectByExample(example);
    }

    @Override
    public Account selectByPrimaryKey(Integer id) {
        return accountMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(Account record, AccountExample example) {
        return accountMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Account record) {
        return accountMapper.updateByPrimaryKeySelective(record);
    }
}
